<template>
    <div>
        <JiraRequire ref="JiraRequireRef" v-bind="$attrs" />
        <NotJiraRequire ref="NotJiraRequireRef" v-bind="$attrs" />
    </div>
</template>

<script lang="ts">
import JiraRequire from './JiraRequire/index.vue';
import NotJiraRequire from './NotJiraRequire/index.vue';
import { defineComponent, ref, unref } from 'vue';
export default defineComponent({
    components: {
        JiraRequire,
        NotJiraRequire
    },
    setup() {
        const JiraRequireRef = ref<any>();
        const NotJiraRequireRef = ref<any>();
        const open = (...args) => {
            const info = args[0];
            if (info.id) {
                if (info.pmpProductDetailDTO.isOutsideSystem === '1') {
                    unref(JiraRequireRef).open(...args);
                } else {
                    unref(NotJiraRequireRef).open(...args);
                }
            }
        };
        return {
            open,
            JiraRequireRef,
            NotJiraRequireRef
        };
    }
});
</script>

<style scoped>
</style>